import './env'
import '@dt/dt/web'
import dt from '@dt/dt'
import tool from '@/common/tool.js'
import '@/biz'
import './version'

dt.tool = tool

dt.getVal = function(info, key) {
  let arr = key.split('.')
  let val = info
  for (let idx = 0; idx < arr.length; idx++) {
    let key = arr[idx]
    if (val[key] != null) {
      val = val[key]
    } else {
      return null
    }
  }
  return val
}

function init(Vue) {
  dt._mixin(Vue)
  Vue.prototype.$dt = dt
}

export default {
  init
}